<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<%@ include file="/view/common/header.jsp"%> 
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>商品清单管理</title>
		<script type="text/javascript">
		
			//查询
			function search(){
				$('#dg').datagrid('load',{
					    designName:   $("#designName").val() ,
					    brandName:   $("#brandName").val() ,
					    shopName:   $("#shopName").val() ,
					    modelName:   $("#modelName").val() ,
				});
			}

			function imageFormate(value) {
				if (value == null) return "";
				return "<img style='height: 50px;width: 50px;' src='" + value + "'/>";
			}
		</script>
	</head>
<body style="margin:1px;">
	<!-- 工具栏  -->
	<div id="tb">
		<div>
			<%--<a href="javascript:openAddDialog('添加商品清单 ' ,'../billgoods/save.do')" class="easyui-linkbutton" iconCls="icon-add" plain="true">新增</a>--%>
			<%--<a href="javascript:openModifyDialog('编辑商品清单 ' ,'../billgoods/save.do')" class="easyui-linkbutton" iconCls="icon-edit" plain="true">修改</a>--%>
			<%--<a href="javascript:delete()" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</a>--%>
		</div>
		<div>
							&nbsp;设计名称：&nbsp;<input type="text" id="designName" size="20"  class="easyui-textbox" />&nbsp;
						
							&nbsp;品牌：&nbsp;<input type="text" id="brandName" size="20"  class="easyui-textbox" />&nbsp;
						
							&nbsp;商家：&nbsp;<input type="text" id="shopName" size="20"  class="easyui-textbox" />&nbsp;
						
							&nbsp;模型：&nbsp;<input type="text" id="modelName" size="20"  class="easyui-textbox" />&nbsp;
						
			<a href="javascript:search()" class="easyui-linkbutton" iconCls="icon-search" plain="true">搜索</a>
		</div>
	</div>
	
	<!-- 查询表单 --> 
	<table id="dg" title="商品清单管理" class="easyui-datagrid"  pagination="true" rownumbers="true"  fit="true"  url="../billgoods/queryForPage.do"  toolbar="#tb">
		 <thead>
				<tr>
					<th data-options="field:'realname',width:100" align="center">姓名</th>
					<th data-options="field:'phone',width:100" align="center">手机号</th>
							<th data-options="field:'count',width:100" align="center">数量</th>
							<th data-options="field:'price',width:100" align="center">单价</th>
							<th data-options="field:'designName',width:100" align="center">设计名称</th>
					<th data-options="field:'modelName',width:100" align="center">模型名</th>
					<th data-options="field:'picUrl',width:100,formatter:imageFormate" align="center">模型小图</th>
					<th data-options="field:'canvasPic',width:100,formatter:imageFormate" align="center">模型平面图</th>
					<th data-options="field:'brandName',width:100" align="center">品牌名</th>
							<th data-options="field:'shopName',width:100" align="center">商家</th>
					
				</tr>
		</thead>
	</table>
	
	
	<!-- 弹出对话框 -->
	<div id="dlg" class="easyui-dialog" style="width: 700px;height:320px;padding: 10px 20px" closed="true" buttons="#dlg-buttons">
		<form id="fm" method="post" novalidate>
		
							<input id="staticsId" name="staticsId" type="hidden" checkbox="true"/>
						 <div class="fitem">
			                <label>数量:</label>
			                <input name="count" class="easyui-textbox easyui-validatebox"   data-options="required:true">   
	           			 </div>
						 <div class="fitem">
			                <label>总价:</label>
			                <input name="totalprice" class="easyui-textbox easyui-validatebox"   data-options="required:true">   
	           			 </div>
						 <div class="fitem">
			                <label>设计名称:</label>
			                <input name="designName" class="easyui-textbox easyui-validatebox"   data-options="required:true">   
	           			 </div>
						 <div class="fitem">
			                <label>模型:</label>
			                <input name="modelName" class="easyui-textbox easyui-validatebox"   data-options="required:true">   
	           			 </div>
						 <div class="fitem">
			                <label>品牌:</label>
			                <input name="brandName" class="easyui-textbox easyui-validatebox"   data-options="required:true">   
	           			 </div>
						 <div class="fitem">
			                <label>商家:</label>
			                <input name="shopName" class="easyui-textbox easyui-validatebox"   data-options="required:true">   
	           			 </div>
      </form>
	</div> 
	
	

	<!-- 保存和关闭按钮 -->
	<div id="dlg-buttons">
		<a href="javascript:save()" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
		<a href="javascript:closeDialog()" class="easyui-linkbutton" iconCls="icon-cancel">关闭</a>
	</div>
	
</body>
</html>